if(NETGEN_USE_PYTHON)
  if(NETGEN_USE_MPI)
  add_test(NAME pytest COMMAND ngspy -m pytest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
else()
  add_test(NAME pytest COMMAND ${NETGEN_PYTHON_EXECUTABLE} -m pytest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()
set_tests_properties ( pytest PROPERTIES TIMEOUT 700 )
  add_custom_target(pytest ${NETGEN_PYTHON_EXECUTABLE} -m pytest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif(NETGEN_USE_PYTHON)
